﻿<c:BaseControl x:Class="personalplaner.gui.mainview.views.ViewControler"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:c="clr-namespace:personalplaner.common.controls;assembly=personalplaner.common"
             xmlns:conv="clr-namespace:personalplaner.common.converters;assembly=personalplaner.common"
             xmlns:bs="clr-namespace:personalplaner.business.stamm;assembly=personalplaner.business"
             xmlns:pa="clr-namespace:personalplaner.gui.plugins.about"
             xmlns:pd="clr-namespace:personalplaner.gui.plugins.dienstplan.views"
               xmlns:k="clr-namespace:personalplaner.common.themes;assembly=personalplaner.common"
             xmlns:vm="clr-namespace:personalplaner.common.mvvm.factory;assembly=personalplaner.common"
             xmlns:fac="clr-namespace:personalplaner.gui.mainview.viewmodels.factories"
               vm:ViewModelLoader.FactoryType="{x:Type fac:ViewControlerModelFactory}"
             mc:Ignorable="d" Foreground="{DynamicResource {x:Static k:ResourceKeys.ForegroundBrush}}" Background="Transparent">

    <Control.Resources>
        
    </Control.Resources>
    
    <Grid Margin="0,0,0,20">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition />
            <!--<ColumnDefinition Width="Auto"/>-->
        </Grid.ColumnDefinitions>

        <!--<TextBlock Text="Dienstplan" FontSize="18" FontWeight="Thin" Grid.ColumnSpan="2" Foreground="#E1FFFFFF" Margin="100,20,0,0"/>-->

        <c:CollapsiblePanel Margin="0,20,5,5" Grid.Row="1" ItemsSource="{Binding Elements}">
            <c:CollapsiblePanel.ItemContainerStyle>
                <Style TargetType="{x:Type c:CollapsibleItem}">
                    <Setter Property="Width" Value="210"/>
                    <Setter Property="IsCollapsed" Value="True"/>
                    <Setter Property="Content" Value="{Binding View}" />
                    <Setter Property="Header" Value="{Binding .}" />
                    <Setter Property="HeaderTemplate">
                        <Setter.Value>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" ToolTip="{Binding Description}">
                                    <Image Source="{Binding Icon}" Height="16" Margin="4,0,4,0"/>
                                    <TextBlock Text="{Binding Name}" FontWeight="Heavy" Margin="10,0,0,0" Foreground="{DynamicResource {x:Static k:ResourceKeys.ForegroundBrush}}"/>
                                </StackPanel>
                            </DataTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </c:CollapsiblePanel.ItemContainerStyle>
        </c:CollapsiblePanel>
        
        <!--<Border BorderBrush="#484848" BorderThickness="0,0,1,0" CornerRadius="4" Margin="0,20,5,5" Grid.Column="1" Grid.Row="1">
            <Border.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Offset="0.0" Color="#484848" />
                    <GradientStop Offset="1.0" Color="#282828" />
                </LinearGradientBrush>
            </Border.Background>

            <Grid>
                <Border Name="Border" BorderBrush="#777" BorderThickness="0,1,0,0" CornerRadius="4,4,0,0" VerticalAlignment="Top" Height="25" >
                    <Border.Background>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Offset="0.0" Color="#505050" />
                            <GradientStop Offset="1.0" Color="#282828" />
                        </LinearGradientBrush>
                    </Border.Background>
                </Border>

                <ContentControl Content="{Binding SelectedControl}"/>

            </Grid>
        </Border>-->

        <!--<Border BorderBrush="{DynamicResource {x:Static k:ResourceKeys.CollapsiblePanelBorderBrush}}" 
                Background="{DynamicResource {x:Static k:ResourceKeys.CollapsiblePanelBackgroundBrush}}" 
                BorderThickness="1,0,1,1" CornerRadius="4" Margin="0,20,5,5" Grid.Column="1" Grid.Row="1">

            <Grid>
                <Border Name="Border" BorderBrush="{DynamicResource {x:Static k:ResourceKeys.CollapsiblePanelHeaderBorderBrush}}" Background="{DynamicResource {x:Static k:ResourceKeys.CollapsiblePanelHeaderBackgroundBrush}}" BorderThickness="0,1,0,0" CornerRadius="4,4,0,0" VerticalAlignment="Top" Height="25" />
                <ContentControl Content="{Binding SelectedControl}"/>

            </Grid>
        </Border>-->

        <ContentControl Grid.Row="1" Grid.Column="1" Content="{Binding SelectedControl}" Style="{DynamicResource {x:Static k:ResourceKeys.MainContentStyleKey}}"/>
        <!--<ContentControl Grid.Row="1" Grid.Column="1" />-->

    </Grid>
</c:BaseControl>
